package com.suixun.controller.credits;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.authority.controller.BaseManager;
import com.suixun.service.credits.CreditTaskService;
import com.suixun.util.Constant;

/**
 * 可以获取积分的任务列表
 * 
 * @author yh
 * @date 2017年11月15日
 */
@RestController
@RequestMapping(value = "/credits/task")
public class CreditTaskController extends BaseManager{
    
    //可以获取积分的任务列表
    @Autowired
    private CreditTaskService taskService;
    
    @RequestMapping(value = "find_all_name.json", method = RequestMethod.GET)
    public Object findAllName() {
        try {
            return success(taskService.findAllName());
        } catch (Exception e) {
            logger("CreditTaskController findAllName:" + e.getMessage(), e);
            return fail(Constant.EXCEPTION.OPERATE_FAIL);
        }
    }

}
